package com.edu.networkexperimentation.model.domain;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 
 * @TableName question
 */
@Data
public class Question implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private String title;

    /**
     * 
     */
    private String type;

    /**
     * 
     */
    private String choice1;

    /**
     * 
     */
    private String choice2;

    /**
     * 
     */
    private String choice3;

    /**
     * 
     */
    private String choice4;

    /**
     * 
     */
    private Integer istrue;

    /**
     * 
     */
    private Integer correctchoice;

    /**
     * 
     */
    private String correctcontent;

    /**
     * 
     */
    private Integer chapter;

    /**
     * 
     */
    private Integer inter;

    /**
     * 
     */
    private Double difficulty;

    /**
     * 
     */
    private Double distinguish;

    /**
     * 
     */
    private Date createtime;

    /**
     * 
     */
    private Date updatetime;

    /**
     * 
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Question other = (Question) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getChoice1() == null ? other.getChoice1() == null : this.getChoice1().equals(other.getChoice1()))
            && (this.getChoice2() == null ? other.getChoice2() == null : this.getChoice2().equals(other.getChoice2()))
            && (this.getChoice3() == null ? other.getChoice3() == null : this.getChoice3().equals(other.getChoice3()))
            && (this.getChoice4() == null ? other.getChoice4() == null : this.getChoice4().equals(other.getChoice4()))
            && (this.getIstrue() == null ? other.getIstrue() == null : this.getIstrue().equals(other.getIstrue()))
            && (this.getCorrectchoice() == null ? other.getCorrectchoice() == null : this.getCorrectchoice().equals(other.getCorrectchoice()))
            && (this.getCorrectcontent() == null ? other.getCorrectcontent() == null : this.getCorrectcontent().equals(other.getCorrectcontent()))
            && (this.getChapter() == null ? other.getChapter() == null : this.getChapter().equals(other.getChapter()))
            && (this.getInter() == null ? other.getInter() == null : this.getInter().equals(other.getInter()))
            && (this.getDifficulty() == null ? other.getDifficulty() == null : this.getDifficulty().equals(other.getDifficulty()))
            && (this.getDistinguish() == null ? other.getDistinguish() == null : this.getDistinguish().equals(other.getDistinguish()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getChoice1() == null) ? 0 : getChoice1().hashCode());
        result = prime * result + ((getChoice2() == null) ? 0 : getChoice2().hashCode());
        result = prime * result + ((getChoice3() == null) ? 0 : getChoice3().hashCode());
        result = prime * result + ((getChoice4() == null) ? 0 : getChoice4().hashCode());
        result = prime * result + ((getIstrue() == null) ? 0 : getIstrue().hashCode());
        result = prime * result + ((getCorrectchoice() == null) ? 0 : getCorrectchoice().hashCode());
        result = prime * result + ((getCorrectcontent() == null) ? 0 : getCorrectcontent().hashCode());
        result = prime * result + ((getChapter() == null) ? 0 : getChapter().hashCode());
        result = prime * result + ((getInter() == null) ? 0 : getInter().hashCode());
        result = prime * result + ((getDifficulty() == null) ? 0 : getDifficulty().hashCode());
        result = prime * result + ((getDistinguish() == null) ? 0 : getDistinguish().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", type=").append(type);
        sb.append(", choice1=").append(choice1);
        sb.append(", choice2=").append(choice2);
        sb.append(", choice3=").append(choice3);
        sb.append(", choice4=").append(choice4);
        sb.append(", istrue=").append(istrue);
        sb.append(", correctchoice=").append(correctchoice);
        sb.append(", correctcontent=").append(correctcontent);
        sb.append(", chapter=").append(chapter);
        sb.append(", inter=").append(inter);
        sb.append(", difficulty=").append(difficulty);
        sb.append(", distinguish=").append(distinguish);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}